#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2018, Intel Corporation
#
#
# pmempool_info/TEST21 -- test for info command with device dax
#
# Same as TEST18, but run on a pool set that spans two Device DAX devices
# with 2M alignment.
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type any
require_dax_device_alignments 2097152 2097152 # 2MiB

setup

LOG=out${UNITTEST_NUM}.log

rm -f $LOG && touch $LOG

POOLSET=$DIR/testset1
create_poolset $POOLSET AUTO:${DEVICE_DAX_PATH[0]} AUTO:${DEVICE_DAX_PATH[1]} \
	O SINGLEHDR

expect_normal_exit $PMEMPOOL$EXESUFFIX rm $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX create obj --layout pmempool$SUFFIX $POOLSET
expect_normal_exit $PMEMPOOL$EXESUFFIX info $POOLSET >> $LOG
expect_normal_exit $PMEMPOOL$EXESUFFIX info ${DEVICE_DAX_PATH[0]} >> $LOG

check

pass
